﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Threading;

namespace HousingDistribution
{
    //更新所有的排序信息，根据分房截止时间
    class TotalPersonSortInfoUpdator
    {
        public void Proc()
        {
            //军人数据如果sort信息有问题，更改程序后需要用这条语句更新。
            StringBuilder sql = new StringBuilder("select * from person ");

            DataTable dt = DBProc.Instance().ReadData(sql.ToString()).Tables[0];

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                PersonInfo person = parser.ParsePerson(dt.Rows[i]);

                sortInfoProc.Proc(person);
            }
        }

        PersonParserFromMySql parser = new PersonParserFromMySql();

        PersonSortInfoProc sortInfoProc = new PersonSortInfoProc();
    }
}
